home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGIALS
/
TCTUTOR.LZH
/
TCTUTOR.ZIP
/
FORMOUT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1987-07-04
|
414b
|
17 lines
/* Chapter 10 - Program 1 */
#include "stdio.h"
main()
{
FILE *fp;
char stuff[25];
int index;
fp = fopen("TENLINES.TXT","w"); /* open for writing */
strcpy(stuff,"This is an example line.");
for (index = 1;index <= 10;index++)
fprintf(fp,"%s Line number %d\n",stuff,index);
fclose(fp); /* close the file before ending program */
}